package com.liuzh.kaoyanspringboot.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.liuzh.kaoyanspringboot.entity.Article;
import com.liuzh.kaoyanspringboot.entity.Collect;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liuzh.kaoyanspringboot.entity.CollectArticle;

import java.util.List;

/**
 * <p>
 * 用户文章收藏关联表 服务类
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-15
 */
public interface CollectService extends IService<Collect> {

    List<Integer> getCollectArticle(Integer collectId);

    Collect getCollect(Integer userId, String collectName);

    void setCollectArticles(Integer collectId, List<Integer> articleIds);

    int setCollectArticle(CollectArticle collectArticle);

    String setArticleCollects(Integer articleId, List<Integer> collectIds);

    List<Collect> listByUser();

    List<Integer> getAInCoList(Integer articleId);

    boolean isCollect(Integer articleId);

    Page<Collect> findPage(Page<Collect> objectPage, String collectName, String username);

    boolean deleteByCollectId(Integer collectId);

    Page<Article> getArticlesDetailByCollectId(Integer pageNum, Integer pageSize, Integer collectId, String articleName);
}
